package com.example.test.主方法运行测试;

import org.redisson.Redisson;
import org.redisson.api.RTopic;
import org.redisson.api.RedissonClient;
import org.redisson.api.listener.MessageListener;
import org.redisson.codec.SerializationCodec;
import org.redisson.config.Config;

public class RedissonMain2 {
    public static void main(String[] args) {
        RedissonClient redisson = null;
        try{
            Config config = new Config();
            config.useSingleServer().setAddress("redis://172.18.3.180:6379");

            redisson = Redisson.create(config);

            RTopic topic = redisson.getTopic("dw",new SerializationCodec());

            topic.publish("12444");

        }
        catch (Exception ex){
            System.out.println(ex.getMessage());
        }
        finally {

        }
    }
}
